package com.lineage.data.event;

import com.lineage.data.executor.EventExecutor;
import com.lineage.server.templates.L1Event;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class NetBarSet extends EventExecutor {
  public static final Map<String, Integer> EXIPLIST = new HashMap<>();
  
  private static final Log _log = LogFactory.getLog(NetBarSet.class);
  
  public static EventExecutor get() {
    return new NetBarSet();
  }
  
  public void execute(L1Event event) {
    String[] set = event.get_eventother().split(",");
    String[] set2 = event.get_eventother2().split("#");
    if (set.length == set2.length) {
      int i = 0;
      while (i < set.length) {
        String ipstring = set[i];
        EXIPLIST.put(ipstring, Integer.valueOf(set2[i]));
        i++;
      } 
    } else {
      _log.warn("网咖IP登入设定错误");
    } 
  }
}
